#!/bin/bash
#


#定义变量
username=root
password=WWW.1.com
file=/mysql/sql/

#备份数据
mysqldump -u$username -p$password --lock-all-tables --master-data=1 --all-databases > /mysql/sql/date_`date +%F_%T`.sql
#/usr/bin/expect << eof
#set timeout 5
#spawn mysqldump -u$username -p --lock-all-tables --master-data=1 --all-databases > /mysql/sql/date_`date +%F_%T`.sql
#expect "password:"
#send "${password}\n"
#expect eof
#eof
